<!DOCTYPE html>
<html>
<head>
    <title></title>
		<#include "/header.html">
            <link rel="stylesheet" href="${request.contextPath}/statics/plugins/sb-admin-2/sb-admin-2.css">
            <link rel="stylesheet" href="${request.contextPath}/statics/css/my.css">

            <style>
                .cloak{
                    padding:20px
                }
            </style>
</head>
<body>
<div class="container-fluid nolrpad" id="tjapp">
    <ul id="myTab" class="nav nav-pills">
        <li class="nobtnli"><a href="#opt" data-toggle="tab"><i class="fa fa-car fa-fw"></i> 车辆信息录入</a></li>
    </ul>
    <div  v-cloak :class="[{'cloak':showList}]">
        <div v-show="showList">
            <div class="grid-btn">
                <#if shiro.hasPermission("xinpai:car:select")>
                    <div class="form-group col-sm-2" style="margin-top:0">
                        <input type="text" class="form-control"  @keyup.enter="query" v-model="q.username" placeholder="车牌号码或者IMEI码">
                    </div>
                    <a class="btn btn-default" @click="query">查询</a>
                </#if>
                <#if shiro.hasPermission("xinpai:car:save")>
                    <a class="btn btn-info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
                </#if>
                <#if shiro.hasPermission("xinpai:car:update")>
                    <a class="btn btn-info" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
                </#if>
                <#if shiro.hasPermission("xinpai:car:delete")>
                    <a class="btn btn-info" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
                </#if>
            </div>
            <table id="jqGrid"></table>
            <div id="jqGridPager"></div>
        </div>
<!--        <div v-show="!showList" class="panel panel-default">
            <div class="panel-heading">{{title}}</div>
            <form class="form-horizontal">
                <div class="form-group">
                    <div class="col-sm-2 control-label"></div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="car.imei" placeholder=""/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">手机卡号</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="car.sim" placeholder="手机卡号"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">车牌号</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="car.plateNum" placeholder="车牌号"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">客户对车辆名称的内部管理号</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="car.interNum" placeholder="客户对车辆名称的内部管理号"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">车辆类型</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="car.type" placeholder="车辆类型"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">出厂日期</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="car.dateManufacture" placeholder="出厂日期"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">购买日期</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="car.purchasDate" placeholder="购买日期"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">行驶证有效期</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="car.drivingLicense" placeholder="行驶证有效期"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">道路运输证编号</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="car.transportLicense" placeholder="道路运输证编号"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">车辆型号</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="car.modelNum" placeholder="车辆型号"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">改装厂商</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="car.vender" placeholder="改装厂商"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">发动机号</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="car.engineOn" placeholder="发动机号"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">车架号</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="car.chassisOn" placeholder="车架号"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">底盘类型关联ID</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="car.underpanType" placeholder="底盘类型关联ID"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">底盘品牌</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="car.underpan" placeholder="底盘品牌"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">上装容积</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="car.cubage" placeholder="上装容积"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">负责人ID</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="car.leadingId" placeholder="负责人ID"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">驾驶员ID</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="car.driverId" placeholder="驾驶员ID"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">车辆状态</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="car.state" placeholder="车辆状态"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">燃料种类</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="car.fuelType" placeholder="燃料种类"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">所属项目ID</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" v-model="car.projectId" placeholder="所属项目ID"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label"></div>
                    <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                    &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
                </div>
            </form>
        </div>-->
    </div>
        <div  v-show="!showList" class="panel panel-default">
            <div class="panel-body nopaddingtop">
                <div class="row rowaddcar"  style="padding-top: 20px;" >
                        <div class="col-lg-4">
                        <div class="row form-group" >
                            <label class="col-md-3 llabel">车辆IMEI:</label>
                            <input type="text" class="col-md-3 form-control form-inline-opt" v-model="car.imei" placeholder="车辆IMEI" :disabled="car.imei!=null&&car.imei!=''&&title!='新增'"/>
                        </div>
                    </div>
                        <div class="col-lg-4">
                            <div class="row form-group" >
                                <label class="col-md-3 llabel">魔盒ID:</label>
                                <input type="text"  v-model="car.cId" class="col-md-3 form-control form-inline-opt" placeholder="请输入魔盒ID" />
                            </div>
                        </div>
                    <div class="col-lg-4">
                        <div class="row form-group" >
                            <label class="col-md-3 llabel">录像机ID:</label>
                            <input type="text"  v-model="car.videoId" class="col-md-3 form-control form-inline-opt" placeholder="录像机ID" />
                        </div>
                    </div>
                        <div class="col-lg-4">
                            <div class="row form-group" >
                                <label class="col-md-3 llabel">SIM卡号:<span v-for="item in car.areaList">{{item}}</span></label>
                                <input type="text" class="col-md-3 form-control form-inline-opt" v-model="car.sim" placeholder="SIM卡号"/>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="row form-group " >
                                <label class="col-md-3 llabel">车牌号码:</label>
                                <input type="text" class="col-md-3 form-control form-inline-opt" v-model="car.plateNum" placeholder="车牌号码"/>
                            </div>
                        </div>
                        <div class="col-lg-4">
                            <div class="row form-group " >
                                <label class="col-md-3 llabel">车辆内部编号:</label>
                                <input type="text" class="col-md-3 form-control form-inline-opt" v-model="car.interNum" placeholder="车辆内部编号"/>
                            </div>
                        </div>
                        <div class="col-lg-4">
                            <div class="row form-group " >
                                <label class="col-md-3 llabel">车辆类型:</label>
                                <select class="col-md-3 form-control form-inline-opt" v-model="car.type">
                                    <option value="0">请选择....</option>
                                    <optgroup :label="key=='车辆类型'?'默认类型':key.replace('车辆类型:','')" v-for="(item,key) in dict.type">
                                        <option v-for="obj in item" :value="obj.code">{{obj.value}}</option>
                                    </optgroup>
                                </select>
                            </div>
                        </div>
                        <div class="form-group col-lg-4">
                            <div class="row " >
                                <label  class="col-md-3 llabel">出厂日期:</label>
                                <input type="date" class="form-control form-inline-opt" v-model="car.dateManufacture" placeholder="出厂日期" />
                            </div>
                        </div>
                        <div class="col-lg-4">
                            <div class="row form-group" >
                                <label class="col-md-3 llabel">购买日期:</label>
                                <input type="date" class="col-md-3 form-control form-inline-opt" v-model="car.purchasDate" placeholder="购买日期"/>
                            </div>
                        </div>
                        <div class="col-lg-4">
                            <div class="row form-group" >
                                <label class="col-md-3 llabel">行驶证有效期:</label>
                                <input type="date" class="col-md-3 form-control form-inline-opt" v-model="car.drivingLicense" placeholder="行驶证有效期"/>
                            </div>
                        </div>
                        <div class="col-lg-4">
                            <div class="row form-group" >
                                <label class="col-md-3 llabel">道路运输证:</label>
                                <input type="text" class="col-md-3 form-control form-inline-opt" v-model="car.transportLicense" placeholder="道路运输证编号"/>
                            </div>
                        </div>
                        <div class="col-lg-4">
                            <div class="row form-group" >
                                <label class="col-md-3 llabel">车辆型号:</label>
                                <input type="text" class="col-md-3 form-control form-inline-opt" v-model="car.modelNum" placeholder="车辆型号"/>
                            </div>
                        </div>
                        <div class="col-lg-4">
                            <div class="row form-group" >
                                <label class="col-md-3 llabel">改装厂商:</label>
                                <input type="text" class="col-md-3 form-control form-inline-opt" v-model="car.vender" placeholder="改装厂商"/>
                            </div>
                        </div>
                        <div class="col-lg-4">
                            <div class="row form-group" >
                                <label class="col-md-3 llabel">发动机号:</label>
                                <input type="text" class="col-md-3 form-control form-inline-opt" v-model="car.engineOn" placeholder="发动机号"/>
                            </div>
                        </div>
                        <div class="col-lg-4">
                            <div class="row form-group" >
                                <label class="col-md-3 llabel">车架号:</label>
                                <input type="text" class="col-md-3 form-control form-inline-opt" v-model="car.chassisOn" placeholder="车架号"/>
                            </div>
                        </div>
                        <div class="col-lg-4">
                            <div class="row form-group" >
                                <label class="col-md-3 llabel">底盘类别:</label>
                                <select class="col-md-3 form-control form-inline form-inline-opt" v-model="car.underpanType">
                                    <option value="0">请选择....</option>
                                    <option v-for="item in dict.underpanType" :value="item.code">{{item.value}}</option>
                                </select>
                            </div>
                        </div>
                        <div class="col-lg-4">
                            <div class="row form-group" >
                                <label class="col-md-3 llabel">底盘品牌:</label>
                                <input type="text" class="col-md-3 form-control form-inline-opt" v-model="car.underpan" placeholder="底盘品牌"/>
                            </div>
                        </div>
                        <div class="col-lg-4">
                            <div class="row form-group" >
                                <label class="col-md-3 llabel">上装容积:</label>
                                <input type="text" class="col-md-3 form-control form-inline-opt" v-model="car.cubage" placeholder="上装容积"/>
                            </div>
                        </div>
                        <div class="col-lg-4">
                            <div class="row form-group" >
                                <label class="col-md-3 llabel">关联负责人:</label>
                                <select class="col-md-3 form-control form-inline form-inline-opt" v-model="car.leadingId">
                                    <option value="0">请选择....</option>
                                    <option v-for="item in userList.leadingId" :value="item.uid">{{item.name+' - '+item.mobile}}</option>
                                </select>
                            </div>
                        </div>
                        <div class="col-lg-4">
                            <div class="row form-group" >
                                <label class="col-md-3 llabel">驾驶员:</label>
                                <select class="col-md-3 form-control form-inline form-inline-opt" v-model="car.driverId">
                                    <option value="0">请选择....</option>
                                    <option v-for="item in userList.driverId" :value="item.uid">{{item.name+' - '+item.mobile}}</option>
                                </select>
                            </div>
                        </div>
                        <div class="col-lg-4">
                            <div class="row form-group" >
                                <label class="col-md-3 llabel">燃料种类:</label>
                                <select class="col-md-3 form-control form-inline form-inline-opt" v-model="car.fuelType">
                                    <option value="0">请选择....</option>
                                    <option v-for="item in dict.fuelType" :value="item.code">{{item.value}}</option>
                                </select>
                            </div>
                        </div>
                        <div class="col-lg-4">
                            <div class="row form-group" >
                                <label class="col-md-3 llabel">所属项目:</label>
                                <select class="col-md-3 form-control form-inline form-inline-opt"  v-model="car.projectId" @change="selectInfo()">
                                    <option value="0" selected>请选择....</option>
                                    <option v-for="item in projectList" :value="item.pid">{{item.projectName}}</option>
                                </select>
                            </div>
                        </div>
                        <div class="col-lg-4" v-show="car.projectId>0">
                            <div class="row form-group" >
                                <label class="col-md-3 llabel">所属区域:</label>
                                <div class="col-sm-10">
                                    <label class="checkbox-inline" v-for="item in areaList">
                                        <input type="checkbox"   :value="item.pid" v-model="car.areaList">{{item.projectName}}
                                    </label>
                                </div>
                            </div>
                        </div>
                </div>
            </div>
            <div class="row">
                <div class="form-group">
                    <div class="col-sm-2 control-label"></div>
                    <input type="button" class="btn btn-info" @click="saveOrUpdate" :value="title"/>
                    &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
                </div>
            </div>
        </div>

</div>

<script src="${request.contextPath}/statics/js/modules/xinpai/car.js?_${.now?long}"></script>
</body>
</html>